package com.szxy.hotel.mapper;

import com.szxy.hotel.entity.Viprecode;
import org.apache.ibatis.annotations.*;

@Mapper
public interface ViprecodeMapper {

    @Select("select * from viprecode where viprecode_id = #{id}")
    @ResultMap("ViprecodeResultMap")
    Viprecode selectViprecode(@Param("id") int id);

    @Insert("insert into viprecode (viprecode_id,viprecode_name,viprecode_money) values(#{id},#{vipType},#{money})")
    @ResultMap("ViprecodeResultMap")
    void insertViprecode(@Param("id") int id,@Param("vipType") String vipType,@Param("money") Double money);

    @Update("update viprecode set viprecode_name = #{vipType},viprecode_money = #{money} where viprecode_id = #{id}")
    @ResultMap("ViprecodeResultMap")
    void updateViprecode(@Param("id") int id,@Param("vipType") String vipType,@Param("money") Double money);
}